package com.gzhryc.shared_device.iot.code.dao;

import com.gzhryc.jdbc.BaseDao;
import com.gzhryc.jdbc.Query;
import com.gzhryc.shared_device.iot.code.dao.db.IOTServerNode;

import java.sql.SQLException;

public class IOTServerNodeDao extends BaseDao<IOTServerNode>{

	public IOTServerNodeDao(String jdbcKey) {
		super(jdbcKey);
	}

	public Long getMaxId() throws SQLException {
		String sql = "SELECT max(id) FROM " + this.tableName;
		Query query = new Query(sql);
		return this.jdbcHelper.getFirstField(query,Long.class);
	}
}
